<%@ page import="com.hotel.entity.BookidDetail" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="../js/calendar.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/hotel/style/style.css"></link>
    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(to right, #e0f7fa, #80deea);
        }

        #container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }

        #content {
            padding: 20px 0;
            display: flex;
            justify-content: center;
        }

        table {
            width: 100%;
            max-width: 800px;
            border-collapse: collapse;
            background-color: #ffffff;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            border-radius: 8px;
            overflow: hidden;
            font-size: 0.95em;
        }

        caption {
            padding: 20px 0;
            font-size: 1.5em;
            font-weight: bold;
            text-align: center;
            color: #006064;
        }

        th, td {
            border: 1px solid #b0bec5;
            padding: 12px 15px;
            text-align: center;
            vertical-align: middle;
        }

        th {
            background-color: #00838f;
            color: white;
            font-weight: bold;
        }

        td {
            color: #333;
        }



        hr {
            margin-top: 40px;
            border: none;
            border-top: 1px solid #ccc;
        }

        #footer {
            text-align: center;
            padding: 20px;
            font-size: 0.9em;
            color: #666;
        }


        input[type="button"] {
            background-color: #00796b;
            color: white;
            font-weight: 600;
            padding: 10px 25px;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1.1em;
            transition: background-color 0.3s ease;
        }

        input[type="button"]:hover {
            background-color: #004d40;
        }
    </style>
    <title>订单明细信息</title>
</head>
<body>
<div id="container">
    <div id="header">
        <ul>
            <li><a href="#">帮助</a></li>
        </ul>
    </div>
    <div id="menu">
        <ul>
      <li><a href="<%=request.getContextPath()%>/hotel/index.jsp">首页</a></li>
      <li><a href="<%=request.getContextPath()%>/list.book">图书列表</a></li>
      <li><a href="<%=request.getContextPath()%>/list.subscription">会员中心</a></li>
        </ul>
    </div>
    <div id="content" style="width:98%;position:relative">
        <div class="submenu">
            <ul>
                <li><a href="<%=request.getContextPath()%>/list.subscription">图书预订</a></li>
                <li><a href="<%=request.getContextPath()%>/list.hsubscription">历史订单</a></li>
                <li><a href="<%=request.getContextPath()%>/editMember.member">修改信息</a></li>
                <li><a href="<%=request.getContextPath()%>/hotel/editPassword.jsp">修改密码</a></li>
                <li><a href="<%=request.getContextPath()%>/hotel/index.jsp">退出系统</a></li>
            </ul>
        </div>
        <div class="subcontent">
            <h1>订单明细信息管理</h1>
            <table>
                <tr>
                    <th>书名</th>
                    <th>图书编号</th>
                    <th>借阅日期</th>
                    <th>退书日期</th>
                    <th>操作</th>
                </tr>
                <%
                    List<BookidDetail> bookidDetails = (List<BookidDetail>) request.getAttribute("bookidDetails");
                    for (BookidDetail detail : bookidDetails) {
                %>
                <tr>
                    <td><%= detail.getBookidType() %></td>
                    <td><%= detail.getBookidNo() %></td>
                    <td><%= detail.getStartDate() %></td>
                    <td><%= detail.getEndDate() %></td>
                    <td>
                        <div>
                            <a href="<%=request.getContextPath()%>/deleteSubscriptionDetail.member?id=<%= detail.getId() %>"
                               onclick="return confirm('真的要删除该预定细信息吗？')">删除</a>
                        </div>
                    </td>
                </tr>
                <%
                    }
                %>
            </table>
            <div class="submit">
                <input type="button" value="返回" onclick="location='<%=request.getContextPath()%>/list.subscription'"/>
                <script>
                    function goBack() {
                        window.history.back();
                    }
                </script>
                <input type="button" value="新增预定" onclick="location='<%=request.getContextPath()%>/hotel/createSubscriptionDtl-1.jsp'"/>
            </div>
        </div>
    </div>
    <hr />
    <div id="footer">
    </div>
</div>
</body>
</html>
